package com.gh.ok.api

import com.ok.common.base.IBaseResponse

/**
 * 模板字段根据后端规范来定义
 */
data class BaseResult<T>(
    val msg: String,
    val code: Int,
    val data: T
) : IBaseResponse<T> {

    override fun code() = code

    override fun msg() = msg

    override fun data() = data

    override fun isSuccess() = code == 200

    override fun isTokenError() = code == 403
}